const px2vw = require('postcss-px-to-viewport')
module.exports = {
    devServer: {
        proxy: {
            '/home': {
                target: 'https://m.mi.com/v1',
                changeOrigin: true,
            }
        }
    },
    css: {
        loaderOptions: {
            postcss: {
                plugins: [px2vw({
                    unitToConvert: 'px',
                    //效果图的宽度
                    viewportWidth: 375,
                    unitPrecision: 5,
                    propList: ['*'],
                    viewportUnit: 'vw',
                    fontViewportUnit: 'vw',
                    selectorBlackList: [],
                    minPixelValue: 1,
                    mediaQuery: false,
                    replace: true,
                    exclude: [/node_modules/],
                    include: undefined,
                    landscape: false,
                    landscapeUnit: 'vw',
                    landscapeWidth: 568
                })]
            }
        }
    }
}